package commands

import (
	"time"

	"github.com/google/uuid"
)

type CreateProductCommand struct {
	ProductID   uuid.UUID `validate:"required"`
	Name        string    `validate:"required,gte=0,lte=255"`
	Description string    `validate:"required,gte=0,lte=5000"`
	Price       float64   `validate:"required,gte=0"`
	CreateAt    time.Time `validate:"required"`
}

func NewCreateProductCommand(name string, description string, price float64) *CreateProductCommand {
	return &CreateProductCommand{
		ProductID:   uuid.New(),
		Name:        name,
		Description: description,
		Price:       price,
		CreateAt:    time.Now(),
	}
}
